import request from '@/utils/request'
import { getApiUrl } from '@/utils/request'

export function listtsWarehouse(query) {
  return request({
    url: '/material/tsWarehouse/list',
    method: 'get',
    params: query
  })
}

export function createtsWarehouse(data) {
  return request({
    url: '/material/tsWarehouse/create',
    method: 'post',
    data
  })
}

export function readtsWarehouse(data) {
  return request({
    url: '/material/tsWarehouse/get/' + data.id,
    method: 'get'
  })
}

export function updatetsWarehouse(data) {
  return request({
    url: '/material/tsWarehouse/update',
    method: 'post',
    data
  })
}

export function deletetsWarehouse(data) {
  let formatObj = data.fequipmentbarcode.replace(/\#/g,"%23")
  return request({
    url: '/material/tsWarehouse/delete/' + formatObj,
    method: 'delete'
  })
}

const uploadPath = getApiUrl() + 'data/room/uploadFile'
export { uploadPath }


